package com.ybbase.framework.model.po.system;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * <p>
 * 系统菜单
 * </p>
 *
 * @author cg
 * @since 2019-11-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_permission")
@ApiModel(value="Permission对象", description="系统菜单")
public class Permission extends Model<Permission> {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "唯一编码")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "创建人")
    @TableField(fill = FieldFill.INSERT)
    private Integer createBy;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createDate;

    @ApiModelProperty(value = "更新人")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Integer updateBy;

    @ApiModelProperty(value = "更新人")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    @ApiModelProperty(value = "备注")
    private String remarks;

    @ApiModelProperty(value = "删除标示 : 0未删除 1已删除")
    @TableLogic
    private Integer delFlag;

    @ApiModelProperty(value = "乐观锁版本管理")
    private Integer version;

    @ApiModelProperty(value = "父节点编码")
    private Integer parentId;

    @ApiModelProperty(value = "上级名称")
    private String parentName;

    @ApiModelProperty(value = "当前路径")
    private String path;

    @ApiModelProperty(value = "排序")
    private Integer sort;

    @ApiModelProperty(value = "名称")
    private String name;

    @ApiModelProperty(value = "链接")
    private String href;

    @ApiModelProperty(value = "目标 : 目标（mainFrame、 _blank、_self、_parent、_top）")
    private String target;

    @ApiModelProperty(value = "图标")
    private String icon;

    @ApiModelProperty(value = "是否在菜单中显示（1：显示；0：不显示）")
    private Integer isShow;

    @ApiModelProperty(value = "权限标示")
    private String permission;

    @ApiModelProperty(value = "按钮权限当前存储为数组")
    private Integer buttonPer;

    @ApiModelProperty(value = "路由名称")
    private String routerName;

    @ApiModelProperty(value = "路由组件")
    private String routerComponent;

    @ApiModelProperty(value = "跳转路径")
    private String routerRedirect;

    @ApiModelProperty(value = "是否缓存0不缓存1缓存")
    private Integer isCatch;

    @ApiModelProperty(value = "是否为面包屑0不是1是")
    private Integer isBreadcrumbs;

    @ApiModelProperty(value = "所属部门机构编码")
    @TableField(fill = FieldFill.INSERT)
    private Integer organId;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
    @ApiModelProperty(value = "选择按钮权限")
    @TableField(exist = false)
    private String[] bottomBarCheck;

    @ApiModelProperty(value = "数据范围")
    @TableField(exist = false)
    private String dataScope;

}
